com.highdeal.pnr.hci
Class PrepaidAccountModel

java.lang.Object
  extended by com.highdeal.pnr.hci.PrepaidAccountModel
All Implemented Interfaces:
XMLMarshallable

public class PrepaidAccountModel
extends java.lang.Object
implements XMLMarshallable

This Java class represents a prepaid account defined in a subscriber account stored in customer master data owned by a service provider; A prepaid account is a balance defined by a minimal value (empty limit).

The balance is usually greater than zero and must not be less than zero; however, if overspending is granted to the user, the balance can be less than zero.

Prepaid account balances can be connected to expiration alerts. An alert is a notification sent to a dedicated system when the balance amount of a prepaid account is less than or equal to the threshold value of an alert.

See Also:
SubscriberAccountModel, AmountAlertModel, ExpirationAlertModel, Notification

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="prepaidAccount">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="amountAlert" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element ref="expirationAlert" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="code" type="xs:string" use="required"/>
     <xs:attribute name="description" type="xs:string" />
     <xs:attribute name="amount" type="xs:string" use="required"/>
     <xs:attribute name="currency" type="xs:string" use="required"/>
     <xs:attribute name="emptyLimit" type="xs:string" use="required"/>
     <xs:attribute name="overrunAccountCode" type="xs:string"/>
     <xs:attribute name="overrunAccountType" type="OverrunAccountBalanceType" use="optional" />
     <xs:attribute name="blockedStateDate" type="xs:dateTime"/>
     <xs:attribute name="lockedStateDate" type="xs:dateTime"/>
     <xs:attribute name="closedStateDate" type="xs:dateTime"/>
     <xs:attribute name="clientId" type="xs:string"/>
   </xs:complexType>
 </xs:element>

 <xs:simpleType name="OverrunAccountBalanceType">
   <xs:restriction base="xs:string">
      <xs:enumeration value="prepaid"/>
      <xs:enumeration value="external"/>
      <xs:enumeration value="undefined"/>
   </xs:restriction>
 </xs:simpleType>


Constructor Summary
PrepaidAccountModel()
          Builds an empty prepaid account.
PrepaidAccountModel(java.lang.String code, java.lang.String description, java.math.BigDecimal amount, java.lang.String currency, java.math.BigDecimal emptyLimit, java.util.Date blockedStateDate, java.util.Date lockedStateDate, java.util.Date closedStateDate, java.lang.String overrunAccountCode, AccountType overrunAccountType)
          Builds a prepaid account.
PrepaidAccountModel(java.lang.String code, java.lang.String description, java.math.BigDecimal amount, java.lang.String currency, java.math.BigDecimal emptyLimit, java.util.Date blockedStateDate, java.util.Date lockedStateDate, java.util.Date closedStateDate, java.lang.String overrunAccountCode, AccountType overrunAccountType, java.lang.String clientId)
          Builds a prepaid account.
 
Method Summary
 void addAmountAlert(AmountAlertModel alert)
          Adds a AmountAlertModel to this prepaid account amount alerts list.
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 void addExpirationAlert(ExpirationAlertModel alert)
          Adds a ExpirationAlertModel to this prepaid account expiration alerts list.
 java.math.BigDecimal getAmount()
          Gets the amount of the prepaid account.
 AmountAlertModel getAmountAlert(int index)
          Gets AmountAlertModel at given index to this prepaid account amount alerts list..
 int getAmountAlertCount()
          Gets the prepaid account amount alerts list size.
 java.util.Iterator<AmountAlertModel> getAmountAlertIterator()
          Gets this prepaid account amount alerts list iterator.
 AmountAlertModel[] getAmountAlerts()
          Gets the prepaid account amount alerts list.
 java.util.Date getBlockedStateDate()
          Gets the blocked state date of the prepaid account.
 java.lang.String getClientId()
          Gets the client identifier of the prepaid account.
 java.util.Date getClosedStateDate()
          Gets the closed state date of the prepaid account.
 java.lang.String getCode()
          Gets the code of the prepaid account.
 RatingContextDescription getContext(ContextualNode child)
           
 java.lang.String getCurrencyCode()
          Gets the currency code of the prepaid account.
 java.lang.String getDescription()
          Gets the description of the prepaid account.
 java.math.BigDecimal getEmptyLimit()
          Gets the empty limit amount of the prepaid account.
 ExpirationAlertModel getExpirationAlert(int index)
          Gets ExpirationAlertModel at given index to this prepaid account expiration alerts list..
 int getExpirationAlertCount()
          Gets the prepaid account expiration alerts list size.
 java.util.Iterator<ExpirationAlertModel> getExpirationAlertIterator()
          Gets this prepaid account expiration alerts list iterator.
 ExpirationAlertModel[] getExpirationAlerts()
          Gets the prepaid account expiration alerts list.
 java.util.Date getLockedStateDate()
          Gets the locked state date of the prepaid account.
 java.lang.String getOverrunAccountCode()
          Gets the overrun account code of the prepaid account.
 AccountType getOverrunAccountType()
          Gets the type of the overrun account.
 RatingContextDescription inheritedContext()
           
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 boolean removeAmountAlert(AmountAlertModel alert)
          Removes a AmountAlertModel to this prepaid account amount alerts list.
 AmountAlertModel removeAmountAlert(int index)
          Removes a AmountAlertModel at given index to this prepaid account amount alerts list.
 boolean removeExpirationAlert(ExpirationAlertModel alert)
          Removes a ExpirationAlertModel to this prepaid account expiration alerts list.
 ExpirationAlertModel removeExpirationAlert(int index)
          Removes a ExpirationAlertModel at given index to this prepaid account expiration alerts list.
 void setAmount(java.math.BigDecimal amount)
          Sets the amount of the prepaid account.
 void setAmountAlerts(AmountAlertModel[] alerts)
          Sets the prepaid account amount alerts list.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setBlockedStateDate(java.util.Date blockedStateDate)
          Sets the blocked state date of the prepaid account.
 void setClientId(java.lang.String clientId)
          Sets the client identifier of the prepaid account.
 void setClosedStateDate(java.util.Date closedStateDate)
          Sets the closed state date of the prepaid account.
 void setCode(java.lang.String code)
          Sets the code of the prepaid account.
 void setCurrencyCode(java.lang.String currencyCode)
          Sets the currency code of the prepaid account.
 void setDescription(java.lang.String description)
          Sets the description of the prepaid account.
 void setEmptyLimit(java.math.BigDecimal emptyLimit)
          Sets the empty limit amount of the prepaid account.
 void setExpirationAlerts(ExpirationAlertModel[] alerts)
          Sets the prepaid account expiration alerts list.
 void setLockedStateDate(java.util.Date lockedStateDate)
          Sets the locked state date of the prepaid account.
 void setOverrunAccountCode(java.lang.String overrunAccountCode)
          Sets the overrun account code of the prepaid account.
 void setOverrunAccountType(AccountType overrunAccountType)
          Sets the type of the overrun account.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrepaidAccountModel

public PrepaidAccountModel()
Builds an empty prepaid account.


PrepaidAccountModel

public PrepaidAccountModel(java.lang.String code,
                           java.lang.String description,
                           java.math.BigDecimal amount,
                           java.lang.String currency,
                           java.math.BigDecimal emptyLimit,
                           java.util.Date blockedStateDate,
                           java.util.Date lockedStateDate,
                           java.util.Date closedStateDate,
                           java.lang.String overrunAccountCode,
                           AccountType overrunAccountType)
Builds a prepaid account. Use this constructor with Transactive Rate and Charge Ed.

Parameters:
code - The code of the prepaid account
description - The description of the prepaid account
amount - The amount of the prepaid account
currency - The currency of the prepaid account
emptyLimit - The empty limit amount of the prepaid account
blockedStateDate - The blocked state date of the prepaid account
lockedStateDate - The locked state date of the prepaid account
closedStateDate - The closed state date of the prepaid account
overrunAccountCode - The overrun account code of the prepaid account
overrunAccountType - The type of the account involved in the overrun of this account

PrepaidAccountModel

public PrepaidAccountModel(java.lang.String code,
                           java.lang.String description,
                           java.math.BigDecimal amount,
                           java.lang.String currency,
                           java.math.BigDecimal emptyLimit,
                           java.util.Date blockedStateDate,
                           java.util.Date lockedStateDate,
                           java.util.Date closedStateDate,
                           java.lang.String overrunAccountCode,
                           AccountType overrunAccountType,
                           java.lang.String clientId)
Builds a prepaid account. Use this constructor with Transactive Bill and Full Ed.

Parameters:
code - the code of the prepaid account.
description - the description of the prepaid account.
amount - the amount of the prepaid account.
currency - the currency of the prepaid account.
emptyLimit - the empty limit amount of the prepaid account.
blockedStateDate - the blocked state date of the prepaid account.
lockedStateDate - the locked state date of the prepaid account.
closedStateDate - the closed state date of the prepaid account.
overrunAccountCode - the overrun account code of the prepaid account.
clientId - the client identifier of the prepaid account.
Method Detail

getDescription

public java.lang.String getDescription()
Gets the description of the prepaid account.

Returns:
The description of the prepaid account

setDescription

public void setDescription(java.lang.String description)
Sets the description of the prepaid account.

Parameters:
description - The description of the prepaid account

getAmount

public java.math.BigDecimal getAmount()
Gets the amount of the prepaid account.

Returns:
The amount of the prepaid account

setAmount

public void setAmount(java.math.BigDecimal amount)
Sets the amount of the prepaid account.

Parameters:
amount - The amount of the prepaid account

getBlockedStateDate

public java.util.Date getBlockedStateDate()
Gets the blocked state date of the prepaid account.

Returns:
The blocked state date of the prepaid account

setBlockedStateDate

public void setBlockedStateDate(java.util.Date blockedStateDate)
Sets the blocked state date of the prepaid account.

Parameters:
blockedStateDate - The blocked state date of the prepaid account

getClosedStateDate

public java.util.Date getClosedStateDate()
Gets the closed state date of the prepaid account.

Returns:
The closed state date of the prepaid account

setClosedStateDate

public void setClosedStateDate(java.util.Date closedStateDate)
Sets the closed state date of the prepaid account.

Parameters:
closedStateDate - The closed state date of the prepaid account

getCode

public java.lang.String getCode()
Gets the code of the prepaid account.

Returns:
The code of the prepaid account

setCode

public void setCode(java.lang.String code)
Sets the code of the prepaid account.

Parameters:
code - The code of the prepaid account

getCurrencyCode

public java.lang.String getCurrencyCode()
Gets the currency code of the prepaid account.

Returns:
The currency code of the prepaid account

setCurrencyCode

public void setCurrencyCode(java.lang.String currencyCode)
Sets the currency code of the prepaid account.

Parameters:
currencyCode - The currency code of the prepaid account

getEmptyLimit

public java.math.BigDecimal getEmptyLimit()
Gets the empty limit amount of the prepaid account.

Returns:
The empty limit amount of the prepaid account

setEmptyLimit

public void setEmptyLimit(java.math.BigDecimal emptyLimit)
Sets the empty limit amount of the prepaid account.

Parameters:
emptyLimit - The empty limit amount of the prepaid account

getLockedStateDate

public java.util.Date getLockedStateDate()
Gets the locked state date of the prepaid account.

Returns:
The locked state date of the prepaid account

setLockedStateDate

public void setLockedStateDate(java.util.Date lockedStateDate)
Sets the locked state date of the prepaid account.

Parameters:
lockedStateDate - The locked state date of the prepaid account

getOverrunAccountCode

public java.lang.String getOverrunAccountCode()
Gets the overrun account code of the prepaid account.

Returns:
The overrun account code of the prepaid account

setOverrunAccountCode

public void setOverrunAccountCode(java.lang.String overrunAccountCode)
Sets the overrun account code of the prepaid account.

Parameters:
overrunAccountCode - The overrun account code of the prepaid account

getOverrunAccountType

public AccountType getOverrunAccountType()
Gets the type of the overrun account.

Returns:
The type of the overrun account code

setOverrunAccountType

public void setOverrunAccountType(AccountType overrunAccountType)
Sets the type of the overrun account.

Parameters:
overrunAccountType - The type of the overrun account code

getClientId

public java.lang.String getClientId()
Gets the client identifier of the prepaid account.

Returns:
The client identifier of the prepaid account

setClientId

public void setClientId(java.lang.String clientId)
Sets the client identifier of the prepaid account.

Parameters:
clientId - The client identifier of the prepaid account

addAmountAlert

public void addAmountAlert(AmountAlertModel alert)
Adds a AmountAlertModel to this prepaid account amount alerts list.

Parameters:
alert - The AmountAlertModel to be added

removeAmountAlert

public boolean removeAmountAlert(AmountAlertModel alert)
Removes a AmountAlertModel to this prepaid account amount alerts list.

Parameters:
alert - The AmountAlertModel to be removed
Returns:
true if the alert is successfully removed, false otherwise

removeAmountAlert

public AmountAlertModel removeAmountAlert(int index)
Removes a AmountAlertModel at given index to this prepaid account amount alerts list.

Parameters:
index - The index of the AmountAlertModel to be removed
Returns:
The removed AmountAlertModel

getAmountAlertCount

public int getAmountAlertCount()
Gets the prepaid account amount alerts list size.

Returns:
The prepaid account amount alerts list size

getAmountAlert

public AmountAlertModel getAmountAlert(int index)
Gets AmountAlertModel at given index to this prepaid account amount alerts list..

Parameters:
index - The index of the AmountAlertModel to be retrieved
Returns:
The AmountAlertModel at given index.

getAmountAlertIterator

public java.util.Iterator<AmountAlertModel> getAmountAlertIterator()
Gets this prepaid account amount alerts list iterator.

Returns:
This prepaid account amount alerts list iterator

getAmountAlerts

public AmountAlertModel[] getAmountAlerts()
Gets the prepaid account amount alerts list.

Returns:
The prepaid account amount alerts list

setAmountAlerts

public void setAmountAlerts(AmountAlertModel[] alerts)
Sets the prepaid account amount alerts list.

Parameters:
alerts - The prepaid account amount alerts list

addExpirationAlert

public void addExpirationAlert(ExpirationAlertModel alert)
Adds a ExpirationAlertModel to this prepaid account expiration alerts list.

Parameters:
alert - The ExpirationAlertModel to be added

removeExpirationAlert

public boolean removeExpirationAlert(ExpirationAlertModel alert)
Removes a ExpirationAlertModel to this prepaid account expiration alerts list.

Parameters:
alert - The ExpirationAlertModel to be removed
Returns:
true if the alert is successfully removed, false otherwise

removeExpirationAlert

public ExpirationAlertModel removeExpirationAlert(int index)
Removes a ExpirationAlertModel at given index to this prepaid account expiration alerts list.

Parameters:
index - The index of the ExpirationAlertModel to be removed
Returns:
The removed ExpirationAlertModel

getExpirationAlertCount

public int getExpirationAlertCount()
Gets the prepaid account expiration alerts list size.

Returns:
The prepaid account expiration alerts list size

getExpirationAlert

public ExpirationAlertModel getExpirationAlert(int index)
Gets ExpirationAlertModel at given index to this prepaid account expiration alerts list..

Parameters:
index - The index of the ExpirationAlertModel to be retrieved
Returns:
The ExpirationAlertModel at given index

getExpirationAlertIterator

public java.util.Iterator<ExpirationAlertModel> getExpirationAlertIterator()
Gets this prepaid account expiration alerts list iterator.

Returns:
This prepaid account expiration alerts list iterator

getExpirationAlerts

public ExpirationAlertModel[] getExpirationAlerts()
Gets the prepaid account expiration alerts list.

Returns:
The prepaid account expiration alerts list

setExpirationAlerts

public void setExpirationAlerts(ExpirationAlertModel[] alerts)
Sets the prepaid account expiration alerts list.

Parameters:
alerts - The prepaid expiration amount alerts list

getContext

public RatingContextDescription getContext(ContextualNode child)

inheritedContext

public RatingContextDescription inheritedContext()

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)